<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SpringAI - Java开发者的AI革命</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .section-title {
            position: relative;
            padding-bottom: 0.5rem;
        }
        .section-title:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 50px;
            height: 3px;
            background: linear-gradient(90deg, #6e8efb 0%, #a777e3 100%);
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #2d2d2d;
            border-radius: 0.5rem;
            overflow: hidden;
        }
        .code-header {
            background-color: #1e1e1e;
            padding: 0.5rem 1rem;
            color: #9e9e9e;
            font-family: monospace;
            display: flex;
            justify-content: space-between;
        }
        .code-content {
            padding: 1rem;
            font-family: monospace;
            color: #f8f8f2;
            overflow-x: auto;
        }
        .comparison-table {
            border-collapse: separate;
            border-spacing: 0;
            width: 100%;
            border-radius: 0.5rem;
            overflow: hidden;
        }
        .comparison-table th {
            background-color: #6e8efb;
            color: white;
            font-weight: 600;
            padding: 1rem;
            text-align: center;
        }
        .comparison-table td {
            padding: 1rem;
            border: 1px solid #e2e8f0;
            text-align: center;
        }
        .comparison-table tr:nth-child(even) {
            background-color: #f8fafc;
        }
        .comparison-table tr:hover {
            background-color: #f1f5f9;
        }
        .result-table {
            width: 100%;
            border-collapse: collapse;
        }
        .result-table th, .result-table td {
            padding: 0.75rem;
            border: 1px solid #e2e8f0;
        }
        .result-table th {
            background-color: #f1f5f9;
            font-weight: 600;
            text-align: left;
        }
        .result-table tr:hover {
            background-color: #f8fafc;
        }
        .floating-button {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            cursor: pointer;
            z-index: 50;
            transition: all 0.3s ease;
        }
        .floating-button:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .mermaid svg {
            max-width: 100%;
            height: auto;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 md:py-32 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4 leading-tight font-serif">SpringAI</h1>
                    <h2 class="text-2xl md:text-3xl font-semibold mb-6">Java开发者的AI革命</h2>
                    <p class="text-lg mb-8 opacity-90">Spring官方推出的AI集成框架，让你的Java应用轻松获得自然语言处理、代码生成、智能决策等前沿AI能力。</p>
                    <div class="flex flex-wrap gap-4">
                        <a href="#features" class="bg-white text-purple-600 hover:bg-gray-100 font-semibold py-3 px-6 rounded-lg transition duration-300 transform hover:-translate-y-1">
                            探索功能 <i class="fas fa-arrow-down ml-2"></i>
                        </a>
                        <a href="#cases" class="border-2 border-white text-white hover:bg-white hover:bg-opacity-10 font-semibold py-3 px-6 rounded-lg transition duration-300 transform hover:-translate-y-1">
                            查看案例 <i class="fas fa-laptop-code ml-2"></i>
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1740979868675-e260dfda-1056-4b59-8bb3-a5b3e268d6a2.png" alt="SpringAI概念图" class="rounded-lg shadow-xl w-full max-w-md">
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container mx-auto max-w-6xl px-4 py-12">
        <!-- Introduction Section -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">SpringAI是什么？为什么你需要它？</h2>
                <p class="text-lg mb-8">想象一下，你的Java应用能够：</p>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-10">
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100 flex items-start">
                        <div class="bg-blue-100 p-3 rounded-full mr-4">
                            <i class="fas fa-comment-dots text-blue-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-1">理解自然语言</h3>
                            <p class="text-gray-600">让应用读懂用户输入</p>
                        </div>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100 flex items-start">
                        <div class="bg-purple-100 p-3 rounded-full mr-4">
                            <i class="fas fa-code text-purple-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-1">自动生成代码</h3>
                            <p class="text-gray-600">提升开发效率</p>
                        </div>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100 flex items-start">
                        <div class="bg-indigo-100 p-3 rounded-full mr-4">
                            <i class="fas fa-chart-line text-indigo-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-1">智能分析数据</h3>
                            <p class="text-gray-600">挖掘数据价值</p>
                        </div>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100 flex items-start">
                        <div class="bg-pink-100 p-3 rounded-full mr-4">
                            <i class="fas fa-thumbs-up text-pink-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-1">个性化推荐</h3>
                            <p class="text-gray-600">提升用户体验</p>
                        </div>
                    </div>
                </div>
                
                <h3 class="text-xl font-semibold mb-4">传统开发 vs SpringAI开发对比：</h3>
                <table class="comparison-table mb-8">
                    <thead>
                        <tr>
                            <th>能力</th>
                            <th>传统开发</th>
                            <th>SpringAI开发</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>自然语言处理</td>
                            <td>需要集成第三方SDK</td>
                            <td>开箱即用</td>
                        </tr>
                        <tr>
                            <td>开发效率</td>
                            <td>手动实现复杂逻辑</td>
                            <td>自动生成代码</td>
                        </tr>
                        <tr>
                            <td>维护成本</td>
                            <td>高</td>
                            <td>低</td>
                        </tr>
                        <tr>
                            <td>可扩展性</td>
                            <td>有限</td>
                            <td>优秀</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </section>

        <!-- Features Section -->
        <section id="features" class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">SpringAI核心功能一览</h2>
                <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1740979936884-7a8ab712-9136-40fd-95a1-13eb66cc40ad.png" alt="SpringAI核心功能" class="w-full rounded-lg mb-8">
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div class="feature-card transition duration-300 bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-comments text-blue-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-semibold">自然语言处理（NLP）</h3>
                        </div>
                        <ul class="space-y-2 pl-4">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>文本分类</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>情感分析</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>实体识别</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="feature-card transition duration-300 bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <div class="flex items-center mb-4">
                            <div class="bg-purple-100 p-3 rounded-full mr-4">
                                <i class="fas fa-pen-fancy text-purple-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-semibold">内容生成</h3>
                        </div>
                        <ul class="space-y-2 pl-4">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>代码生成</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>文档撰写</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>创意写作</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="feature-card transition duration-300 bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <div class="flex items-center mb-4">
                            <div class="bg-indigo-100 p-3 rounded-full mr-4">
                                <i class="fas fa-brain text-indigo-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-semibold">智能决策</h3>
                        </div>
                        <ul class="space-y-2 pl-4">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>数据预测</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>异常检测</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>推荐系统</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="feature-card transition duration-300 bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <div class="flex items-center mb-4">
                            <div class="bg-pink-100 p-3 rounded-full mr-4">
                                <i class="fas fa-network-wired text-pink-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-semibold">多模型支持</h3>
                        </div>
                        <ul class="space-y-2 pl-4">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>OpenAI</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>Azure AI</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span>本地模型</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Case Study 1 -->
        <section id="cases" class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">实战案例一：智能客服系统</h2>
                <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1740979998528-c0957aa0-52ac-46b1-8cf0-da67de02e2f7.png" alt="智能客服系统" class="w-full rounded-lg mb-8">
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4">3.1 需求场景</h3>
                    <ul class="space-y-3 pl-4">
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>自动回复用户咨询</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>支持多轮对话</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>理解用户意图</span>
                        </li>
                    </ul>
                </div>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4">3.2 代码实现</h3>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第一步：添加依赖</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>pom.xml</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.ai&lt;/groupId&gt;
    &lt;artifactId&gt;spring-ai-openai-spring-boot-starter&lt;/artifactId&gt;
    &lt;version&gt;0.8.1&lt;/version&gt;
&lt;/dependency&gt;</pre>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第二步：配置API密钥</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>application.yml</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>spring:
  ai:
    openai:
      api-key: ${OPENAI_API_KEY}
      chat:
        model: gpt-4-turbo</pre>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第三步：实现智能对话</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>AiCustomerService.java</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>@Service
public class AiCustomerService {
    private final ChatClient chatClient;

    public AiCustomerService(ChatClient chatClient) {
        this.chatClient = chatClient;
    }

    public String handleQuery(String userInput) {
        String prompt = """
            你是一个电商客服专家，请用中文回答用户问题。
            当前系统状态：
            - 用户已登录
            - 最近订单：OD123456（已发货）
            
            用户问题：%s
            """.formatted(userInput);

        return chatClient.call(prompt);
    }
}</pre>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第四步：控制器接入</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>CustomerController.java</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>@RestController
public class CustomerController {
    private final AiCustomerService aiService;

    @PostMapping("/chat")
    public String chat(@RequestBody String message) {
        return aiService.handleQuery(message);
    }
}</pre>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-xl font-semibold mb-4">3.3 效果展示</h3>
                    <table class="result-table">
                        <thead>
                            <tr>
                                <th>用户输入</th>
                                <th>系统响应</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>"我的订单到哪了？"</td>
                                <td>"您的订单OD123456已发货，预计明天送达"</td>
                            </tr>
                            <tr>
                                <td>"我要退货"</td>
                                <td>"请问您要退哪个订单？"</td>
                            </tr>
                            <tr>
                                <td>"登录不了，密码错误"</td>
                                <td>"建议您尝试找回密码，需要帮您跳转吗？"</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </section>

        <!-- Case Study 2 -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">实战案例二：智能代码生成器</h2>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4">4.1 需求场景</h3>
                    <ul class="space-y-3 pl-4">
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>根据需求描述生成代码</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>支持多种编程语言</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>自动生成单元测试</span>
                        </li>
                    </ul>
                </div>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4">4.2 代码实现</h3>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第一步：配置代码生成模型</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>application.yml</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>spring:
  ai:
    openai:
      code:
        model: code-davinci-002</pre>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第二步：实现代码生成服务</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>CodeGenerationService.java</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>@Service
public class CodeGenerationService {
    private final CodeGenerationClient codeClient;

    public String generateCode(String requirement) {
        String prompt = """
            根据以下需求生成Java代码：
            %s
            要求：
            - 使用Spring Boot框架
            - 包含单元测试
            - 代码风格符合Google Java规范
            """.formatted(requirement);

        return codeClient.call(prompt);
    }
}</pre>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-2">第三步：控制器接入</h4>
                        <div class="code-block">
                            <div class="code-header">
                                <span>CodeController.java</span>
                                <button class="text-sm text-blue-300 hover:text-blue-100">
                                    <i class="fas fa-copy"></i> 复制
                                </button>
                            </div>
                            <div class="code-content">
                                <pre>@RestController
@RequestMapping("/code")
public class CodeController {
    private final CodeGenerationService codeService;

    @PostMapping("/generate")
    public String generate(@RequestBody String requirement) {
        return codeService.generateCode(requirement);
    }
}</pre>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-xl font-semibold mb-4">4.3 示例输出</h3>
                    <div class="mb-4">
                        <h4 class="font-medium mb-2">输入：</h4>
                        <p class="bg-gray-100 p-4 rounded">"实现一个REST API，接收用户信息并保存到数据库"</p>
                    </div>
                    
                    <h4 class="font-medium mb-2">输出：</h4>
                    <div class="code-block mb-8">
                        <div class="code-header">
                            <span>Generated Code</span>
                            <button class="text-sm text-blue-300 hover:text-blue-100">
                                <i class="fas fa-copy"></i> 复制
                            </button>
                        </div>
                        <div class="code-content">
                            <pre>@RestController
@RequestMapping("/users")
public class UserController {
    private final UserRepository userRepo;

    @PostMapping
    public ResponseEntity&lt;User&gt; createUser(@RequestBody User user) {
        User savedUser = userRepo.save(user);
        return ResponseEntity.ok(savedUser);
    }
}

@Entity
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
    private int age;
    // Getters and Setters
}

public interface UserRepository extends JpaRepository&lt;User, Long&gt; {
}</pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Best Practices -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">SpringAI最佳实践</h2>
                
                <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-lightbulb text-yellow-500 mr-3"></i>
                            Prompt设计技巧
                        </h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">1</span>
                                </div>
                                <span>明确角色：定义AI的身份</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">2</span>
                                </div>
                                <span>提供上下文：让AI更懂业务</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">3</span>
                                </div>
                                <span>限制输出格式：方便后续处理</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-tachometer-alt text-green-500 mr-3"></i>
                            性能优化
                        </h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">1</span>
                                </div>
                                <span>缓存常用结果：减少API调用</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">2</span>
                                </div>
                                <span>批量处理请求：提高吞吐量</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">3</span>
                                </div>
                                <span>异步调用：避免阻塞主线程</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-shield-alt text-red-500 mr-3"></i>
                            安全防护
                        </h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">1</span>
                                </div>
                                <span>输入校验：防止Prompt注入</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">2</span>
                                </div>
                                <span>输出过滤：屏蔽敏感信息</span>
                            </li>
                            <li class="flex items-start">
                                <div class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-2 flex-shrink-0">
                                    <span class="text-xs font-bold">3</span>
                                </div>
                                <span>访问控制：限制API调用频率</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Architecture Diagram -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 section-title font-serif">AI驱动的开发范式</h2>
                
                <div class="mermaid mb-8">
                    graph TD
                        A[需求自动转化] -->|自然语言| B(生成业务代码)
                        B --> C[智能调试与优化]
                        C --> D[自适应系统]
                        D -->|运行时数据| A
                        B --> E[单元测试]
                        C --> F[性能分析]
                        D --> G[自动调整行为]
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-3">1. 需求自动转化</h3>
                        <p class="text-gray-600">自然语言直接生成业务代码，大幅提升开发效率。</p>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-3">2. 智能调试与优化</h3>
                        <p class="text-gray-600">AI辅助定位和修复Bug，提高代码质量和稳定性。</p>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-lg border border-gray-100">
                        <h3 class="text-xl font-semibold mb-3">3. 自适应系统</h3>
                        <p class="text-gray-600">根据运行时数据自动调整行为，实现智能化运维。</p>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-semibold text-white mb-2">技术小馆</h3>
                    <p class="text-gray-400">探索前沿技术，分享开发经验</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition duration-300 flex items-center">
                        <i class="fas fa-link mr-2"></i> http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500 text-sm">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <!-- Floating Action Button -->
    <div class="floating-button" onclick="window.scrollTo({top: 0, behavior: 'smooth'})">
        <i class="fas fa-arrow-up text-xl"></i>
    </div>

    <script>
        // Initialize Mermaid
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            },
            securityLevel: 'loose'
        });
        
        // Copy buttons functionality
        document.querySelectorAll('.code-header button').forEach(button => {
            button.addEventListener('click', (e) => {
                const codeBlock = e.currentTarget.closest('.code-block');
                const codeContent = codeBlock.querySelector('.code-content pre').textContent;
                navigator.clipboard.writeText(codeContent).then(() => {
                    const originalText = e.currentTarget.innerHTML;
                    e.currentTarget.innerHTML = '<i class="fas fa-check"></i> 已复制';
                    setTimeout(() => {
                        e.currentTarget.innerHTML = originalText;
                    }, 2000);
                });
            });
        });
    </script>
</body>
</html>